<!DOCTYPE html>
<html lang=zh>
<head>
  <meta charset="utf-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no,email=no,adress=no">
  <!-- Color theme for statusbar -->
  <meta name="theme-color" content="#000000" />
  <!-- 强制页面在当前窗口以独立页面显示,防止别人在框架里调用页面 -->
  <meta http-equiv="window-target" content="_top" />
  
  
  <title>在工作中遇到的问题 | 永恒的金色年华</title>
  <meta name="description" content="2020东鹏portal07月09日 ​        1.element-ui的table表格布局多了一条线（已解决） ​            答：添加样式 123&gt;.el-table::before &amp;#123; &#x2F;&#x2F; 解决table-el布局栏多一条线的问题z-index: inherit;&gt;&amp;#125;  ​        2.element-ui新增表单提交数据后还出现验证">
<meta property="og:type" content="article">
<meta property="og:title" content="在工作中遇到的问题">
<meta property="og:url" content="https://xulujin.gitee.io/blog/2020/07/17/%E5%B7%A5%E4%BD%9C%E4%B8%AD%E7%A2%B0%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/index.html">
<meta property="og:site_name" content="LuKing">
<meta property="og:description" content="2020东鹏portal07月09日 ​        1.element-ui的table表格布局多了一条线（已解决） ​            答：添加样式 123&gt;.el-table::before &amp;#123; &#x2F;&#x2F; 解决table-el布局栏多一条线的问题z-index: inherit;&gt;&amp;#125;  ​        2.element-ui新增表单提交数据后还出现验证">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://cdn2.jianshu.io/assets/default_avatar/4-3397163ecdb3855a0a4139c34a695885.jpg">
<meta property="og:image" content="https://xulujin.gitee.io/blog/C:/Users/luking/AppData/Local/Temp/1636700861225.png">
<meta property="article:published_time" content="2020-07-17T06:31:29.000Z">
<meta property="article:modified_time" content="2022-06-16T04:53:45.332Z">
<meta property="article:author" content="LuKing-Xun">
<meta property="article:tag" content="智扬信达">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn2.jianshu.io/assets/default_avatar/4-3397163ecdb3855a0a4139c34a695885.jpg">
  <!-- Canonical links -->
  <link rel="canonical" href="https://xulujin.gitee.io/blog/2020/07/17/%E5%B7%A5%E4%BD%9C%E4%B8%AD%E7%A2%B0%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/index.html">
  
    <link rel="alternate" href="/atom.xml" title="LuKing" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png" type="image/x-icon">
  
  
<link rel="stylesheet" href="/blog/css/style.css">

  
  
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitment@0.0.3/style/default.min.css">
  
  
  
<meta name="generator" content="Hexo 5.2.0"></head>


<body class="main-center theme-black" itemscope itemtype="http://schema.org/WebPage">
  <header class="header" itemscope itemtype="http://schema.org/WPHeader">
  <div class="slimContent">
    <div class="navbar-header">
      
      
      <div class="profile-block text-center">
        <a id="avatar" href="https://github.com/1314xulujin" target="_blank">
          <img class="img-circle img-rotate" src="/blog/images/avatar.jpg" width="200" height="200">
        </a>
        <h2 id="name" class="hidden-xs hidden-sm">LuKing-Xun</h2>
        <h3 id="title" class="hidden-xs hidden-sm hidden-md">前端工程师</h3>
        <small id="location" class="text-muted hidden-xs hidden-sm"><i class="icon icon-map-marker"></i> Shenzhen, China</small>
      </div>
      
      <div class="search" id="search-form-wrap">

    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="Search" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat" onclick="return false;"><i class="icon icon-search"></i></button>
            </span>
        </div>
    </form>
    <div class="ins-search">
  <div class="ins-search-mask"></div>
  <div class="ins-search-container">
    <div class="ins-input-wrapper">
      <input type="text" class="ins-search-input" placeholder="Type something..." x-webkit-speech />
      <button type="button" class="close ins-close ins-selectable" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
    </div>
    <div class="ins-section-wrapper">
      <div class="ins-section-container"></div>
    </div>
  </div>
</div>


</div>
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <nav id="main-navbar" class="collapse navbar-collapse" itemscope itemtype="http://schema.org/SiteNavigationElement" role="navigation">
      <ul class="nav navbar-nav main-nav menu-highlight">
        
        
        <li class="menu-item menu-item-home">
          <a href="/blog/.">
            
            <i class="icon icon-home-fill"></i>
            
            <span class="menu-title">Home</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives">
            
            <i class="icon icon-archives-fill"></i>
            
            <span class="menu-title">Archives</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories">
            
            <i class="icon icon-folder"></i>
            
            <span class="menu-title">Categories</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags">
            
            <i class="icon icon-tags"></i>
            
            <span class="menu-title">Tags</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-repository">
          <a href="/blog/repository">
            
            <i class="icon icon-project"></i>
            
            <span class="menu-title">Repository</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-books">
          <a href="/blog/books">
            
            <i class="icon icon-book-fill"></i>
            
            <span class="menu-title">Books</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-links">
          <a href="/blog/links">
            
            <i class="icon icon-friendship"></i>
            
            <span class="menu-title">Links</span>
          </a>
        </li>
        
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about">
            
            <i class="icon icon-cup-fill"></i>
            
            <span class="menu-title">About</span>
          </a>
        </li>
        
      </ul>
      
	
    <ul class="social-links">
    	
        <li><a href="https://github.com/1314xulujin" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="icon icon-github"></i></a></li>
        
        <li><a href="https://mail.qq.com/cgi-bin/loginpage" target="_blank" title="Email" data-toggle=tooltip data-placement=top><i class="icon icon-email"></i></a></li>
        
        <li><a href="/blog/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="icon icon-rss"></i></a></li>
        
    </ul>

    </nav>
  </div>
</header>

  
    <aside class="sidebar" itemscope itemtype="http://schema.org/WPSideBar">
  <div class="slimContent">
    
      <div class="widget">
    <h3 class="widget-title">Board</h3>
    <div class="widget-body">
        <div id="board">
            <div class="content">
                <p>一如前端深似海,回头?...没头回了!</p>
            </div>
        </div>
    </div>
</div>

    
      

    
      
  <div class="widget">
    <h3 class="widget-title">Tags</h3>
    <div class="widget-body">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/BFC/" rel="tag">BFC</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/BootStrap/" rel="tag">BootStrap</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/ES6/" rel="tag">ES6</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/HTML5-css3/" rel="tag">HTML5+css3</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/OOP%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E6%80%9D%E6%83%B3/" rel="tag">OOP面向对象思想</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/Storage%E5%AD%98%E5%82%A8/" rel="tag">Storage存储</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/Web-Worker/" rel="tag">Web Worker</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/ajax/" rel="tag">ajax</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/call%E5%92%8Capply/" rel="tag">call和apply</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/css3/" rel="tag">css3</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/git/" rel="tag">git</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/hexo%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2/" rel="tag">hexo搭建博客</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/html4/" rel="tag">html4</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/jQuery/" rel="tag">jQuery</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/java/" rel="tag">java</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/javascript/" rel="tag">javascript</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/js/" rel="tag">js</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/photoshop/" rel="tag">photoshop</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/vue/" rel="tag">vue</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/webpack/" rel="tag">webpack</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/websocket/" rel="tag">websocket</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/window10/" rel="tag">window10</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%85%B6%E4%BB%96/" rel="tag">其他</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%86%B7%E7%9F%A5%E8%AF%86/" rel="tag">冷知识</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%87%BD%E6%95%B0%E6%9F%AF%E9%87%8C%E5%8C%96/" rel="tag">函数柯里化</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%8C%96/" rel="tag">前端工程化</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95%E9%A2%98/" rel="tag">前端面试题</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8FUI%E6%A1%86%E6%9E%B6/" rel="tag">微信小程序UI框架</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E6%95%99%E7%A8%8B/" rel="tag">教程</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E6%99%BA%E6%89%AC%E4%BF%A1%E8%BE%BE/" rel="tag">智扬信达</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E6%9C%AC%E7%A7%91%E8%80%83%E8%AF%95%E7%A7%91%E7%9B%AE/" rel="tag">本科考试科目</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E8%B7%A8%E5%9F%9F/" rel="tag">跨域</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E8%BD%AF%E4%BB%B6%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" rel="tag">软件设计模式</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E8%BD%AF%E5%AE%9E%E5%8A%9B/" rel="tag">软实力</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E9%9D%A2%E8%AF%95/" rel="tag">面试</a><span class="tag-list-count">10</span></li><li class="tag-list-item"><a class="tag-list-link" href="/blog/tags/%E9%9D%A2%E8%AF%95%E9%A2%98/" rel="tag">面试题</a><span class="tag-list-count">7</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget-body tagcloud">
      <a href="/blog/tags/BFC/" style="font-size: 13px;">BFC</a> <a href="/blog/tags/BootStrap/" style="font-size: 13px;">BootStrap</a> <a href="/blog/tags/ES6/" style="font-size: 13px;">ES6</a> <a href="/blog/tags/HTML5-css3/" style="font-size: 13px;">HTML5+css3</a> <a href="/blog/tags/OOP%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E6%80%9D%E6%83%B3/" style="font-size: 13px;">OOP面向对象思想</a> <a href="/blog/tags/Storage%E5%AD%98%E5%82%A8/" style="font-size: 13px;">Storage存储</a> <a href="/blog/tags/Web-Worker/" style="font-size: 13px;">Web Worker</a> <a href="/blog/tags/ajax/" style="font-size: 13px;">ajax</a> <a href="/blog/tags/call%E5%92%8Capply/" style="font-size: 13px;">call和apply</a> <a href="/blog/tags/css3/" style="font-size: 13px;">css3</a> <a href="/blog/tags/git/" style="font-size: 13px;">git</a> <a href="/blog/tags/hexo%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2/" style="font-size: 13px;">hexo搭建博客</a> <a href="/blog/tags/html4/" style="font-size: 13px;">html4</a> <a href="/blog/tags/jQuery/" style="font-size: 13px;">jQuery</a> <a href="/blog/tags/java/" style="font-size: 13px;">java</a> <a href="/blog/tags/javascript/" style="font-size: 13.14px;">javascript</a> <a href="/blog/tags/js/" style="font-size: 13px;">js</a> <a href="/blog/tags/photoshop/" style="font-size: 13px;">photoshop</a> <a href="/blog/tags/vue/" style="font-size: 13.71px;">vue</a> <a href="/blog/tags/webpack/" style="font-size: 13.14px;">webpack</a> <a href="/blog/tags/websocket/" style="font-size: 13px;">websocket</a> <a href="/blog/tags/window10/" style="font-size: 13px;">window10</a> <a href="/blog/tags/%E5%85%B6%E4%BB%96/" style="font-size: 13px;">其他</a> <a href="/blog/tags/%E5%86%B7%E7%9F%A5%E8%AF%86/" style="font-size: 13.14px;">冷知识</a> <a href="/blog/tags/%E5%87%BD%E6%95%B0%E6%9F%AF%E9%87%8C%E5%8C%96/" style="font-size: 13px;">函数柯里化</a> <a href="/blog/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 13.43px;">前端</a> <a href="/blog/tags/%E5%89%8D%E7%AB%AF%E5%B7%A5%E7%A8%8B%E5%8C%96/" style="font-size: 13px;">前端工程化</a> <a href="/blog/tags/%E5%89%8D%E7%AB%AF%E9%9D%A2%E8%AF%95%E9%A2%98/" style="font-size: 13.86px;">前端面试题</a> <a href="/blog/tags/%E5%BE%AE%E4%BF%A1%E5%B0%8F%E7%A8%8B%E5%BA%8FUI%E6%A1%86%E6%9E%B6/" style="font-size: 13px;">微信小程序UI框架</a> <a href="/blog/tags/%E6%95%99%E7%A8%8B/" style="font-size: 13px;">教程</a> <a href="/blog/tags/%E6%99%BA%E6%89%AC%E4%BF%A1%E8%BE%BE/" style="font-size: 13.29px;">智扬信达</a> <a href="/blog/tags/%E6%9C%AC%E7%A7%91%E8%80%83%E8%AF%95%E7%A7%91%E7%9B%AE/" style="font-size: 13px;">本科考试科目</a> <a href="/blog/tags/%E8%B7%A8%E5%9F%9F/" style="font-size: 13px;">跨域</a> <a href="/blog/tags/%E8%BD%AF%E4%BB%B6%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/" style="font-size: 13px;">软件设计模式</a> <a href="/blog/tags/%E8%BD%AF%E5%AE%9E%E5%8A%9B/" style="font-size: 13px;">软实力</a> <a href="/blog/tags/%E9%9D%A2%E8%AF%95/" style="font-size: 14px;">面试</a> <a href="/blog/tags/%E9%9D%A2%E8%AF%95%E9%A2%98/" style="font-size: 13.57px;">面试题</a>
    </div>
  </div>

    
      
  <div class="widget">
    <h3 class="widget-title">Archive</h3>
    <div class="widget-body">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2022/06/">六月 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2022/05/">五月 2022</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2022/01/">一月 2022</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/11/">十一月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/08/">八月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/06/">六月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/05/">五月 2021</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/04/">四月 2021</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2021/02/">二月 2021</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/09/">九月 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/08/">八月 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/07/">七月 2020</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/06/">六月 2020</a><span class="archive-list-count">12</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/05/">五月 2020</a><span class="archive-list-count">10</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/04/">四月 2020</a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/03/">三月 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/02/">二月 2020</a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2020/01/">一月 2020</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2019/12/">十二月 2019</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2019/11/">十一月 2019</a><span class="archive-list-count">7</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2019/10/">十月 2019</a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2018/12/">十二月 2018</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/blog/archives/2018/10/">十月 2018</a><span class="archive-list-count">6</span></li></ul>
    </div>
  </div>


    
      
  <div class="widget">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget-body">
      <ul class="recent-post-list list-unstyled no-thumbnail">
        
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/blog/2022/06/16/%E5%B0%86node-sass%E6%8D%A2%E6%88%90dart-sass/" class="title">将node-sass换成dart-sass</a>
              </p>
              <p class="item-date">
                <time datetime="2022-06-16T04:55:29.000Z" itemprop="datePublished">2022-06-16</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/blog/2022/05/25/%E8%87%AA%E5%B7%B1%E5%AF%B9%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%8F%8A%E4%BA%A4%E4%BB%98%E6%B5%81%E7%A8%8B%E7%90%86%E8%A7%A3/" class="title">自己对软件开发及交付流程理解</a>
              </p>
              <p class="item-date">
                <time datetime="2022-05-25T06:31:29.000Z" itemprop="datePublished">2022-05-25</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/blog/2022/05/16/web%E5%89%8D%E7%AB%AF%E5%B8%B8%E8%A7%81%E5%85%B3%E9%94%AE%E8%AF%8D/" class="title">web前端关键词</a>
              </p>
              <p class="item-date">
                <time datetime="2022-05-16T03:21:19.000Z" itemprop="datePublished">2022-05-16</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/blog/2022/01/19/%E5%AD%97%E8%8A%82%E9%A3%9E%E4%B9%A6%E9%9D%A2%E8%AF%95%E9%A2%98_20220119/" class="title">腾讯互娱面试题</a>
              </p>
              <p class="item-date">
                <time datetime="2022-01-19T02:10:23.000Z" itemprop="datePublished">2022-01-19</time>
              </p>
            </div>
          </li>
          
          <li>
            
            <div class="item-inner">
              <p class="item-category">
                
              </p>
              <p class="item-title">
                <a href="/blog/2021/11/12/js%E5%B0%86%E5%A4%9A%E4%B8%AA%E5%9B%BE%E7%89%87%E6%8B%BC%E5%9C%A8%E4%B8%80%E8%B5%B7%E4%B8%8B%E8%BD%BD%E6%88%90%E4%B8%80%E5%BC%A0%E5%9B%BE%E7%89%87/" class="title">(no title)</a>
              </p>
              <p class="item-date">
                <time datetime="2021-11-12T04:28:18.079Z" itemprop="datePublished">2021-11-12</time>
              </p>
            </div>
          </li>
          
      </ul>
    </div>
  </div>
  

    
  </div>
</aside>

  
  
<main class="main" role="main">
  <div class="content">
  <article id="post-工作中碰到的一些问题" class="article article-type-post" itemscope itemtype="http://schema.org/BlogPosting">
    
    <div class="article-header">
      
        
  
    <h1 class="article-title" itemprop="name">
      在工作中遇到的问题
    </h1>
  

      
      <div class="article-meta">
        <span class="article-date">
    <i class="icon icon-calendar-check"></i>
	<a href="/blog/2020/07/17/%E5%B7%A5%E4%BD%9C%E4%B8%AD%E7%A2%B0%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/" class="article-date">
	  <time datetime="2020-07-17T06:31:29.000Z" itemprop="datePublished">2020-07-17</time>
	</a>
</span>
        
        
  <span class="article-tag">
    <i class="icon icon-tags"></i>
	<a class="article-tag-link-link" href="/blog/tags/%E6%99%BA%E6%89%AC%E4%BF%A1%E8%BE%BE/" rel="tag">智扬信达</a>
  </span>


        

        <span class="post-comment"><i class="icon icon-comment"></i> <a href="/blog/2020/07/17/%E5%B7%A5%E4%BD%9C%E4%B8%AD%E7%A2%B0%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/#comments" class="article-comment-link">Comments</a></span>
        
      </div>
    </div>
    <div class="article-entry marked-body" itemprop="articleBody">
      
        <h2 id="2020"><a href="#2020" class="headerlink" title="2020"></a>2020</h2><h3 id="东鹏portal"><a href="#东鹏portal" class="headerlink" title="东鹏portal"></a>东鹏portal</h3><h4 id="07月09日"><a href="#07月09日" class="headerlink" title="07月09日"></a>07月09日</h4><blockquote>
<p>​        1.element-ui的table表格布局多了一条线<a style="color:#ff3c3c">（已解决）</a></p>
<p>​            答：添加样式</p>
<figure class="highlight css"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&gt;.el-table::before &#123; // 解决table-el布局栏多一条线的问题</span><br><span class="line"><span class="selector-tag">z-index</span>: <span class="selector-tag">inherit</span>;</span><br><span class="line">&gt;&#125;</span><br></pre></td></tr></table></figure>

<p>​        2.element-ui新增表单提交数据后还出现验证<a style="color:#ff3c3c">（已解决）</a></p>
<p>​            答：请求接口之后重置表单验证</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&gt;<span class="built_in">this</span>.$refs[formName].resetFields() <span class="comment">// 解决提交表单数据后还触发验证的问题</span></span><br></pre></td></tr></table></figure>

<p>​        3.常常碰到与后端对接口的问题<a style="color:#ff3c3c">（常见）</a>：比如返回的字段少了(分类字段)，比如新增用户过去带的状态(userStatus)是无效的(0),但是更新数据返回过来的还是有效的用户</p>
</blockquote>
<h3 id="祥生经营分析"><a href="#祥生经营分析" class="headerlink" title="祥生经营分析"></a>祥生经营分析</h3><h4 id="11月09日"><a href="#11月09日" class="headerlink" title="11月09日"></a>11月09日</h4><p>2020年11月06日开会需要提出的问题<br>1.svn账号问题，（因为有多个人同时进行项目协作，用同一个账号在导致冲突之后不能及时的找到根源而浪费时间）<br>2.vpn账号权限问题，vpn账号申请<br>3.</p>
<p>项目</p>
<p>1.关于数据的问题：数据不完整，导致联调时在接口请求方式正确的情况下错误判断为其他问题<br>2.后端接口规范问题：</p>
<blockquote>
<p>1.最好不要返回map类型数据</p>
<p>2.在返回数据带上相应的status，code，data，msg等等</p>
<p>3.在传入空字符串后端应判断接收该参数没传而返回相应的msg提示，比如：参数错误400错误</p>
<p>4.在少传了参数之后返回msg：参数缺失，而不是直接报400错误</p>
<p>5.接口文档可以一般用swragger把传的参数的备注model，和返回的参数的意思标注规范，必传可以用粗体列出来require，</p>
</blockquote>
<p>3.多人开发协调问题：</p>
<blockquote>
<p>1.规定时间上传代码，</p>
<p>2.上传的描述见开发框架的README.md文档</p>
<p>3.规定一个必须的发版时间（在确认所有人上传代码完毕）</p>
</blockquote>
<h4 id="11月08日"><a href="#11月08日" class="headerlink" title="11月08日"></a>11月08日</h4><p>1.关于sessionStorage存入函数的问题</p>
<blockquote>
<p>问题描述：1.由于需要页面之间需要sessionStorage来传值，需要将传的值JSON.stringify，但是有些需要传的值有函数，在JSON.stringify之后不会存储。</p>
<p>解决方法：1.首先需要使用toSting()将函数真正的转化为字符串，才可以将他存入到sessionStorage中。</p>
<p>​                 2.然后接收方需要使用eval函数将字符串执行。</p>
<p>​                    3.使用eval函数你会碰到Function statements require a function name，这是由于匿名函数直接执行而不知道他是谁的函数</p>
<p>​                    4.我们需要在这个需要执行的字符串外层加一个括号，然后再使用eval函数执行。</p>
</blockquote>
<h4 id="11月13日"><a href="#11月13日" class="headerlink" title="11月13日"></a>11月13日</h4><blockquote>
<p>1.关于IE不能打开tomcat运行的页面</p>
<p>​    问题可能起因：1.本机防火墙问题</p>
<p>​                                2.IE自身兼容性问题</p>
<p>2.关于tomcat换了端口之后，比如把8443换成8444端口，不能访问</p>
<p>​    问题可能起因：1.本机防火墙问题                    </p>
<p>​    解决方法：<br>   systemctl stop firewalld 关闭防火墙<br>   systemctl status  firewalld  查看防火墙状态</p>
<p>​    内外服务器如果比较安全的话，可以把防火墙关了</p>
<p>问题解决结果：完美解决！</p>
</blockquote>
<h4 id="12月02日"><a href="#12月02日" class="headerlink" title="12月02日"></a>12月02日</h4><blockquote>
<p>​        1.经营分析明细表下钻问题：</p>
<p>​            问题描述：由于后端返回的参数没有统一，返回的规范最好要有areaCode（组织编码），areaType（组织层级），且传的参数在签约，存货，计划页面中有多少个层级就写了多少个参数，这样做很不合理，于是在后面改成了传areaCode和areaType。</p>
</blockquote>
<h4 id="12月19日"><a href="#12月19日" class="headerlink" title="12月19日"></a>12月19日</h4><blockquote>
<p>东鹏portal碰到问题：</p>
<p>问题描述：1.前端本地请求接口不成功，但是打包到服务器没问题</p>
<p>问题起因：问题解决了，因为接口在这里set-cookie的时候，有一个”Secure”属性，但是，我本地启动的时候，是http协议启动的，这里的“Secure”属性会把我拦截掉，因为它觉得这是不安全的协议。后面我本地启动改成，https，就可以正常登录了。然后，我去调小城的本地，因为我们都是http，协议相同，所以可以登录。但是服务器是https的。 </p>
<p>问题解决结果：完美解决！</p>
</blockquote>
<h4 id="12月21日"><a href="#12月21日" class="headerlink" title="12月21日"></a>12月21日</h4><blockquote>
<p>问题描述：1.ant-design-vue 的table组件在企业微信PC端不显示  2.打包后样式不生效了</p>
<p>问题起因：是因为组件的样式在main.js注册时被覆盖了，所以所以导致这两个问题。</p>
<p>解决办法：将注册组件及其样式写到 import App from ‘./App.vue’; 前面就没问题了。</p>
<p>问题解决结果：完美解决！</p>
</blockquote>
<h2 id="2021"><a href="#2021" class="headerlink" title="2021"></a>2021</h2><h4 id="02月03日"><a href="#02月03日" class="headerlink" title="02月03日"></a>02月03日</h4><blockquote>
<p>项目：祥生经营分析平台</p>
<p>问题描述：关于 ant-design-vue table底部合计栏。</p>
<p>问题起因：因为 ant-design-vue table 插槽的footer的只是一行，而没有表格的功能，但是element有，所以想参照element制作底部合计栏目 </p>
<p>ant-design-vue table:<a target="_blank" rel="noopener" href="https://www.antdv.com/components/table-cn/">https://www.antdv.com/components/table-cn/</a></p>
<p>element-ui table:<a target="_blank" rel="noopener" href="https://element.eleme.cn/#/zh-CN/component/table#table-column-scoped-slot">https://element.eleme.cn/#/zh-CN/component/table#table-column-scoped-slot</a></p>
<p>解决办法：1.使用插槽给 ant-table 插进去两个footer 一个是普通footer，一个是用于fixed的footer,</p>
<p>html代码：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br></pre></td><td class="code"><pre><span class="line">&gt;<span class="tag">&lt;<span class="name">template</span> <span class="attr">v-if</span>=<span class="string">&quot;sumShow == true&quot;</span> <span class="attr">slot</span>=<span class="string">&quot;footer&quot;</span>&gt;</span></span><br><span class="line"> &lt;table</span><br><span class="line">   class=&quot;footer-table&quot;</span><br><span class="line">   :style=&quot;&#x27;width:&#x27; + (this.scrollData.x - 0.5) + &#x27;px&#x27;&quot;</span><br><span class="line"> &gt;</span><br><span class="line">   <span class="tag">&lt;<span class="name">colgroup</span>&gt;</span></span><br><span class="line">     <span class="comment">&lt;!--              &lt;col style=&quot;width: 80px; min-width: 80px;&quot; /&gt;--&gt;</span></span><br><span class="line">     &lt;col</span><br><span class="line">       v-for=&quot;(item, index) in headerLists&quot;</span><br><span class="line">       :key=&quot;index&quot;</span><br><span class="line">       :style=&quot;colStyle(item)&quot;</span><br><span class="line">     /&gt;</span><br><span class="line">   <span class="tag">&lt;/<span class="name">colgroup</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;<span class="name">tbody</span> <span class="attr">class</span>=<span class="string">&quot;ant-table-tbody&quot;</span> <span class="attr">style</span>=<span class="string">&quot;position: relative&quot;</span>&gt;</span></span><br><span class="line">     <span class="tag">&lt;<span class="name">tr</span> <span class="attr">v-if</span>=<span class="string">&quot;tableDatas.length &gt; 0&quot;</span>&gt;</span></span><br><span class="line">       <span class="tag">&lt;<span class="name">td</span> <span class="attr">v-for</span>=<span class="string">&quot;(item, index) in headerLists&quot;</span> <span class="attr">:key</span>=<span class="string">&quot;index&quot;</span>&gt;</span></span><br><span class="line">         &#123;&#123;</span><br><span class="line">           typeof tableDatas0[item.dataIndex] == &#x27;object&#x27;</span><br><span class="line">             ? tableDatas0[item.dataIndex].value +</span><br><span class="line">               tableDatas0[item.dataIndex].unitValue</span><br><span class="line">             : tableDatas0[item.dataIndex]</span><br><span class="line">         &#125;&#125;</span><br><span class="line">         &#123;&#123;</span><br><span class="line">           tableDatas0[item.dataIndex].unitValue</span><br><span class="line">             ? &#x27;&#x27;</span><br><span class="line">             : item.scopedSlots</span><br><span class="line">             ? item.scopedSlots.customRender</span><br><span class="line">             : &#x27;&#x27;</span><br><span class="line">         &#125;&#125;</span><br><span class="line">       <span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">     <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;/<span class="name">tbody</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line">&gt;<span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line">&gt;<span class="tag">&lt;<span class="name">template</span> <span class="attr">v-if</span>=<span class="string">&quot;sumShow == true&quot;</span> <span class="attr">slot</span>=<span class="string">&quot;footer&quot;</span>&gt;</span></span><br><span class="line"> &lt;table</span><br><span class="line">   class=&quot;footer-table1&quot;</span><br><span class="line">   :style=&quot;</span><br><span class="line">     &#x27;width:&#x27; +</span><br><span class="line">       (this.scrollData.x - 0.5) +</span><br><span class="line">       &#x27;px;height:&#x27; +</span><br><span class="line">       tableFooterHeight +</span><br><span class="line">       &#x27;px&#x27;</span><br><span class="line">   &quot;</span><br><span class="line"> &gt;</span><br><span class="line">   <span class="tag">&lt;<span class="name">colgroup</span>&gt;</span></span><br><span class="line">     <span class="comment">&lt;!--              &lt;col style=&quot;width: 80px; min-width: 80px;&quot; /&gt;--&gt;</span></span><br><span class="line">     &lt;col</span><br><span class="line">       v-for=&quot;(item, index) in headerLists&quot;</span><br><span class="line">       :key=&quot;index&quot;</span><br><span class="line">       :style=&quot;colStyle(item)&quot;</span><br><span class="line">     /&gt;</span><br><span class="line">   <span class="tag">&lt;/<span class="name">colgroup</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;<span class="name">tbody</span> <span class="attr">class</span>=<span class="string">&quot;ant-table-tbody&quot;</span> <span class="attr">style</span>=<span class="string">&quot;position: relative&quot;</span>&gt;</span></span><br><span class="line">     <span class="tag">&lt;<span class="name">tr</span> <span class="attr">v-if</span>=<span class="string">&quot;tableDatas.length &gt; 0&quot;</span>&gt;</span></span><br><span class="line">       &lt;td</span><br><span class="line">         v-show=&quot;item.fixed&quot;</span><br><span class="line">         v-for=&quot;(item, index) in headerLists&quot;</span><br><span class="line">         :key=&quot;index&quot;</span><br><span class="line">         style=&quot;background: #fafafa;&quot;</span><br><span class="line">       &gt;</span><br><span class="line">         &#123;&#123;</span><br><span class="line">           typeof tableDatas0[item.dataIndex] == &#x27;object&#x27;</span><br><span class="line">             ? tableDatas0[item.dataIndex].value +</span><br><span class="line">               tableDatas0[item.dataIndex].unitValue</span><br><span class="line">             : tableDatas0[item.dataIndex]</span><br><span class="line">         &#125;&#125;</span><br><span class="line">       <span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">     <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">   <span class="tag">&lt;/<span class="name">tbody</span>&gt;</span></span><br><span class="line"> <span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br><span class="line">&gt;<span class="tag">&lt;/<span class="name">template</span>&gt;</span></span><br><span class="line"></span><br><span class="line">&gt;也就是和其tbody一样生成一个tfoot ， 其结构相同</span><br></pre></td></tr></table></figure>

<p>2.要做到左右跟着滚动，精髓是 事件onscroll 和窗口属性scrollleft</p>
<p>js代码：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">&gt;<span class="keyword">let</span> wrapDiv = <span class="built_in">document</span>.getElementsByClassName(<span class="string">&#x27;ant-table-body&#x27;</span>)[<span class="number">0</span>]; <span class="comment">// 外层盒子div</span></span><br><span class="line"></span><br><span class="line">&gt;<span class="keyword">if</span> (wrapDiv) &#123;</span><br><span class="line"> wrapDiv.addEventListener(<span class="string">&#x27;scroll&#x27;</span>, <span class="function">() =&gt;</span> &#123;</span><br><span class="line">   <span class="keyword">if</span> (wrapDiv.scrollTop &gt; <span class="number">20</span>) &#123;</span><br><span class="line">     <span class="built_in">this</span>.toTopClickActive = <span class="literal">true</span>;</span><br><span class="line">   &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">     <span class="built_in">this</span>.toTopClickActive = <span class="literal">false</span>;</span><br><span class="line">   &#125;</span><br><span class="line"> &#125;);</span><br><span class="line"> <span class="keyword">if</span> (wrapDiv.scrollTop &gt; <span class="number">20</span>) &#123;</span><br><span class="line">   <span class="built_in">this</span>.toTopClickActive = <span class="literal">true</span>;</span><br><span class="line"> &#125; <span class="keyword">else</span> &#123;</span><br><span class="line">   <span class="built_in">this</span>.toTopClickActive = <span class="literal">false</span>;</span><br><span class="line"> &#125;</span><br><span class="line">&gt;&#125;</span><br><span class="line"></span><br><span class="line">&gt;也就是在左右滑动时获取自己的scrollleft赋值给别人</span><br></pre></td></tr></table></figure>

<p>3.要做到fixed列，因为我们做了两个footer，其中一个footer就是用来fixed的，循环其headerList,来判断哪个列是要 fixed 的，需要fixed就显示出来。（我想ant-design-vue也是这一样的原理）</p>
<p>问题处理结果：完美解决！</p>
</blockquote>
<h4 id="02月04日"><a href="#02月04日" class="headerlink" title="02月04日"></a>02月04日</h4><blockquote>
<p>关于在祥生经营分析平台项目总结：</p>
<p>1.不足：</p>
<p>​    1.选用前端ui框架不合理，比如应该使用element-ui但是使用了ant-design-vue,</p>
<p>​    2.echarts封装不合理，刚开始几乎是并没有封装echarts,其封装程度还停留在东鹏手机bi的水平线，所以，在最后时间不是很紧的时候，自己研究了一种更加合理的封装方案（在项目门户的投模页面的symbolicChart.vue组件中），这个封装在我看来还是比较的合理，他拥有了许多的默认配置参数。</p>
<p>​    3.与后台初步工作协商没有达成很好的一致性，导致后台返回的数据结构在前端中不能合理的使用。</p>
<ol start="2">
<li><p>学到的知识</p>
</li>
<li><p>熟悉了ant-design-vue ui框架的使用，并更加了解他与element-ui的区别，学习如何深度改装ant-design-vue的table组件，自己完成其  合计栏 的封装。</p>
</li>
<li><p>更加熟悉了echarts的封装，对其进行更加高度的封装，在项目中更加快速，高效的开发。</p>
</li>
<li><p>更加了解后台返回的数据结构怎么样才能合理的给前端去使用。</p>
</li>
<li><p>了解了服务器防火墙知识。</p>
</li>
<li><p>学会一些linux命令来上传前端包。</p>
</li>
<li><p>发现了webstorm的新大陆：断点调试，ftp上传，自带的shell命令行。</p>
</li>
</ol>
</blockquote>
<h4 id="02月20日"><a href="#02月20日" class="headerlink" title="02月20日"></a>02月20日</h4><blockquote>
<p>1.问题描述：后台返回一段字符中含有&lt;br&gt;换行标签，前端需要怎么处理才能换行显示。</p>
<p>2.解决办法：</p>
<p>​    ①：将后台返回的 &lt;br&gt; 标签替换成 \n , 使用 replace(/\n/g,’&lt;br&gt;’) 替换。</p>
<p>​    ②：如果是 vue 就使用v-html指令将其显示上去。</p>
<p>3.问题处理结果：完美解决！</p>
</blockquote>
<h3 id="金地集团投资管理平台"><a href="#金地集团投资管理平台" class="headerlink" title="金地集团投资管理平台"></a>金地集团投资管理平台</h3><h4 id="02月20日-1"><a href="#02月20日-1" class="headerlink" title="02月20日"></a>02月20日</h4><blockquote>
<p>项目：金地投资管理平台</p>
<p>1.关于该项目碰到的一些问题：</p>
<p>​        ①：客户需要用 IE 浏览器来使用采集平台，兼容IE成为一大问题。</p>
<p>​        ②：文件上传集成功能在IE浏览器无效。</p>
<p>​        ③：IE浏览器对 px2rem 1px转换单位不能识别。</p>
<p>​        ④：IE浏览器样式较丑，后期还需要修改。</p>
<p>​    解决办法：</p>
<p>​        ①：</p>
<p>​        ②：</p>
<p>​        ③：使用 postcss-plugin-px2rem 插件代替 postcss-px2rem</p>
<p>​        ④：</p>
<p>2.碰到的一些小知识：</p>
<p>​        ①：在 api 请求实例中创建 delete 方法 ，直接创建一个名为 delete 的方法报错，原因是 delete 是关键字。    </p>
</blockquote>
<h4 id="05月13日"><a href="#05月13日" class="headerlink" title="05月13日"></a>05月13日</h4><blockquote>
<div style="width:100%">![](https://pics3.baidu.com/feed/908fa0ec08fa513d9ac7880a6ebb04fcb0fbd9d7.jpeg?token=b6d793ae8142658f0bf6d4030e320f26)</div>    

<p>使用 date-fns插件技巧：</p>
<p>1.得到此时的三年前的时间:</p>
<p>​    new Date(String(new Date().getFullYear() - 3) + this.$format(new Date(), ‘-MM’)) </p>
<p>​    原理是获取当前年减去 3 ，再拼接月份和日期等等；</p>
</blockquote>
<h4 id="05月18日"><a href="#05月18日" class="headerlink" title="05月18日"></a>05月18日</h4><blockquote>
<p>在 IE 浏览器碰到的代码执行顺序的问题；</p>
<p>场景描述： 在请求删除表格数据接口 deleteData（异步操作）之后调用请求当前数据接口 getData ;</p>
<p>​             在除了 IE 浏览器中可以不在 deleteData 的异步成功回调 then 函数调用 getData,也可以加载数据，但是在 IE 浏览器中，一定需要到 deleteData 的回调函数调用 getData 获取数据才能重新渲染； </p>
<p>得出结论：IE 浏览器对代码执行顺序较为严格，因为 js 是单线程的，要延后一段代码的执行就不能写成并行执行的代码；</p>
</blockquote>
<h4 id="06月01日"><a href="#06月01日" class="headerlink" title="06月01日"></a>06月01日</h4><blockquote>
<p>学到的东西：</p>
<ol>
<li>最好提前写好全局样式供后期使用；</li>
<li>比如写好一个 layout 全局样式用来布局；</li>
<li>写好一个弹窗样式用来布局；</li>
<li>写好多个主题的 表格 用来使用；</li>
<li>写好时间选择器的样式用来布局（时间选择器可以用组件封装一遍再投入使用，因为很多默认时间会是一样的）；</li>
<li>最好使用全局变量来做 echarts 图的 字体颜色，字体大小，背景颜色配置；这样对后期维护更加友好；</li>
<li>碰到相同的页面可以抽离成组件进行使用，碰到相似的页面可以将 数据data,方法methods 等等抽离成混入 mixin 代码使用；</li>
</ol>
</blockquote>
<h4 id="06月02日"><a href="#06月02日" class="headerlink" title="06月02日"></a>06月02日</h4><blockquote>
<ol>
<li>new Date(‘2015-5’)在IE浏览器会转化成 invalida Date , 需要协会曾规范的形式new Date(‘2015-05’)才能正常转化；</li>
</ol>
</blockquote>
<h4 id="06月04日"><a href="#06月04日" class="headerlink" title="06月04日"></a>06月04日</h4><blockquote>
<ol>
<li><p>问题描述： input file 文件上传，在第一次上传文件触发 change 事件之后，下次再 上传文件 将不会触发 change 事件；</p>
<p>解决办法：将这个 input dom元素刷新一遍；</p>
<p>具体方法：     1. 将这个 dom 删除，再克隆一个新的 dom 出来供使用；</p>
<p>​            2.在 vue 中可以使用 v-if ，将其 show 设置为 false ,再设置为true;</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">&lt;template&gt;</span><br><span class="line">	&lt;div&gt;</span><br><span class="line">        &lt;input v-if&#x3D;&quot;fileShow&quot; @change&#x3D;&#39;changeFile&#39; &#x2F;&gt;</span><br><span class="line">    &lt;&#x2F;div&gt;</span><br><span class="line">&lt;&#x2F;template&gt;</span><br><span class="line">&lt;script&gt;</span><br><span class="line">    export default&#123;</span><br><span class="line">        data()&#123;</span><br><span class="line">            return &#123;</span><br><span class="line">                fileShow:true</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;,</span><br><span class="line">        methods:&#123;</span><br><span class="line">            reload()&#123;</span><br><span class="line">                this.fileShow &#x3D; false;</span><br><span class="line">                this.$nextTick(()&#x3D;&gt;&#123;</span><br><span class="line">                    this.fileShow &#x3D; true</span><br><span class="line">                &#125;)</span><br><span class="line">            &#125;,</span><br><span class="line">            changeFile()&#123;</span><br><span class="line">                console.log(&#39;触发change事件&#39;)</span><br><span class="line">                &#x2F;&#x2F; 做完其他操作刷新该 dom , 这样下次还会触发该change事件 </span><br><span class="line">                this.reload();</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&lt;&#x2F;script&gt;</span><br></pre></td></tr></table></figure>


</li>
</ol>
</blockquote>
<h4 id="07月13日"><a href="#07月13日" class="headerlink" title="07月13日"></a>07月13日</h4><blockquote>
<h3 id="企业微信开启调试模式"><a href="#企业微信开启调试模式" class="headerlink" title="企业微信开启调试模式"></a>企业微信开启调试模式</h3><p>访问<a target="_blank" rel="noopener" href="https://work.weixin.qq.com/api/doc/90000/90139/90315#%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1Windows%E7%89%88%E6%9C%AC%E8%B0%83%E8%AF%95">https://work.weixin.qq.com/api/doc/90000/90139/90315#%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1Windows%E7%89%88%E6%9C%AC%E8%B0%83%E8%AF%95</a></p>
<ol>
<li>把 <a target="_blank" rel="noopener" href="https://dldir1.qq.com/foxmail/wwopen_docFile/devtools_resources.pak">devtools_resources.pak</a> 放到企业微信的安装目录下（复制的文件名，要保证为 devtools_resources.pak），注意安装目录带有版本号（4.0.1304.400是浏览器内核的版本号）；</li>
<li>关闭企业微信，重新启动；</li>
<li>按快捷键 ctrl + alt + shift + D，进入调试模式；</li>
<li>即可开启调试模式，关闭操作与开启操作相同；</li>
</ol>
</blockquote>
<h4 id="07月26日"><a href="#07月26日" class="headerlink" title="07月26日"></a>07月26日</h4><blockquote>
<p>表格在 IE 中使用了 position: relative 会失去边框</p>
</blockquote>
<h4 id="09月26日"><a href="#09月26日" class="headerlink" title="09月26日"></a>09月26日</h4><blockquote>
<p>自定义虚线边框</p>
<p>background: repeating-linear-gradient(90deg, #ccc, #ccc 1.5em, transparent 0, transparent 4em); </p>
<ol>
<li>90 deg为虚线左右边倾斜度</li>
<li>#ccc 为虚线颜色</li>
<li>1.5rem 为单个虚线长度</li>
<li>4rem 为虚线密度</li>
</ol>
</blockquote>
<h4 id="09月30日"><a href="#09月30日" class="headerlink" title="09月30日"></a>09月30日</h4><blockquote>
<p>tail -f xxx.log  查看 tomcat 实时日志(找到 /logs 文件夹下面)</p>
</blockquote>
<h3 id="智扬云平台产品"><a href="#智扬云平台产品" class="headerlink" title="智扬云平台产品"></a>智扬云平台产品</h3><h4 id="10月08日"><a href="#10月08日" class="headerlink" title="10月08日"></a>10月08日</h4><blockquote>
<p>关于使用在 react 中使用 px2rem 自适应插件</p>
<p>步骤：</p>
<ol>
<li><p>npm install postcss-plugin-px2rem lib-flexible –save-dev</p>
</li>
<li><p>在 config-overrides.js 中引用使用</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> px2rem = <span class="built_in">require</span>(<span class="string">&#x27;postcss-plugin-px2rem&#x27;</span>);</span><br><span class="line"></span><br><span class="line"><span class="built_in">module</span>.exports = override(</span><br><span class="line">  (config, env) =&gt; &#123;</span><br><span class="line">    <span class="comment">// 重写postcss</span></span><br><span class="line">    rewirePostcss(config, &#123;</span><br><span class="line">      plugins: <span class="function">() =&gt;</span> [</span><br><span class="line">        <span class="comment">//关键:设置px2rem</span></span><br><span class="line">        px2rem(&#123;</span><br><span class="line">          rootValue: <span class="number">192</span>,</span><br><span class="line">          mediaQuery: <span class="literal">false</span>, <span class="comment">// （布尔值）允许在媒体查询中转换px。</span></span><br><span class="line">          minPixelValue: <span class="number">2</span>, <span class="comment">// 设置要替换的最小像素值(3px会被转rem)。 默认 0</span></span><br><span class="line">          exclude: <span class="regexp">/node-modules/</span></span><br><span class="line">        &#125;)</span><br><span class="line">      ],</span><br><span class="line">    &#125;);</span><br><span class="line">    <span class="keyword">return</span> config</span><br><span class="line">  &#125;</span><br><span class="line">);</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<ol start="3">
<li>在 main.js 入口文件引入 lib-flexible.js 自适应工具类；</li>
</ol>
</li>
</ol>
</blockquote>
<h4 id="10月09日"><a href="#10月09日" class="headerlink" title="10月09日"></a>10月09日</h4><blockquote>
<h1 id="create-react-app-IE11-无法运行"><a href="#create-react-app-IE11-无法运行" class="headerlink" title="create-react-app IE11 无法运行"></a>create-react-app IE11 无法运行</h1><p><img src="https://cdn2.jianshu.io/assets/default_avatar/4-3397163ecdb3855a0a4139c34a695885.jpg" alt="img"></p>
<p><a target="_blank" rel="noopener" href="https://www.jianshu.com/u/793e9b9739ce">793e9b9739ce</a>关注</p>
<p>2021.03.29 17:24:19字数 111阅读 65</p>
<h2 id="背景"><a href="#背景" class="headerlink" title="背景"></a>背景</h2><p>项目使用create-react-app、typescript创建，ie11下报‘语法错误’</p>
<h2 id="解决方案"><a href="#解决方案" class="headerlink" title="解决方案"></a>解决方案</h2><p>1、安装react-app-polyfill</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">&gt;npm install react-app-polyfill</span><br></pre></td></tr></table></figure>

<ol>
<li>在src/index.tsx的<strong>最顶部</strong>引入</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&gt;import &#39;react-app-polyfill&#x2F;ie11&#39;;</span><br><span class="line">&gt;import &#39;react-app-polyfill&#x2F;stable&#39;;</span><br></pre></td></tr></table></figure>

<p>3、在packge.json文件下 browserlist 添加ie11</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">&gt;&quot;browserslist&quot;: &#123;</span><br><span class="line">       &quot;production&quot;: [</span><br><span class="line">           &quot;&gt;0.2%&quot;,</span><br><span class="line">           &quot;not dead&quot;,</span><br><span class="line">           &quot;not op_mini all&quot;,</span><br><span class="line">           &quot;ie 11&quot;</span><br><span class="line">       ],</span><br><span class="line">       &quot;development&quot;: [</span><br><span class="line">           &quot;last 1 chrome version&quot;,</span><br><span class="line">           &quot;last 1 firefox version&quot;,</span><br><span class="line">           &quot;last 1 safari version&quot;,</span><br><span class="line">           &quot;ie 11&quot;</span><br><span class="line">       ]</span><br><span class="line">   &#125;</span><br></pre></td></tr></table></figure>

<p>4、 重启。否则删除node_modules文件夹下的内容重新安装</p>
<h2 id="参考"><a href="#参考" class="headerlink" title="参考"></a>参考</h2><p><a target="_blank" rel="noopener" href="https://links.jianshu.com/go?to=https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md">https://github.com/facebook/create-react-app/blob/master/packages/react-app-polyfill/README.md</a></p>
<p>然而你以为你解决了吗，不!!!!!!!!!!!!!,虽然可以显示了，但是浏览器会直接卡死</p>
<p>这时就不要引入 react-app-polyfill 了（注释掉）</p>
<p>而是下载 babel-ployfill 和上述一样引入，方可解决</p>
</blockquote>
<h4 id="10月20日"><a href="#10月20日" class="headerlink" title="10月20日"></a>10月20日</h4><blockquote>
<p>关于使用 react 做项目：</p>
<ol>
<li><p>熟悉其 state 和 生命周期 ：</p>
<p>constructor </p>
<p>state 定义的数据存放 </p>
<p>defaultProps props 默认值 </p>
<p>componentDidMount<br>shouldComponentUpdate<br>componentWillUnmount<br>componentDidCatch<br>getSnapshotBeforeUpdate<br>componentDidUpdate<br>componentWillMount<br>UNSAFE_componentWillMount<br>componentWillReceiveProps<br>UNSAFE_componentWillReceiveProps<br>componentWillUpdate<br>UNSAFE_componentWillUpdate</p>
<p>render 渲染函数</p>
</li>
</ol>
<ol start="2">
<li><p>使用 react 封装一个组件：</p>
<figure class="highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">WaveLoading</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line">  state = &#123;&#125;;</span><br><span class="line">  <span class="function"><span class="title">render</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> (</span><br><span class="line">      &lt;div className=<span class="string">&quot;waveLoading&quot;</span>&gt;</span><br><span class="line">        &lt;div className=<span class="string">&quot;sk-wave&quot;</span>&gt;</span><br><span class="line">          &lt;div className=<span class="string">&quot;sk-wave-rect&quot;</span>&gt;&lt;/div&gt;</span><br><span class="line">          &lt;div className=<span class="string">&quot;sk-wave-rect&quot;</span>&gt;&lt;/div&gt;</span><br><span class="line">          &lt;div className=<span class="string">&quot;sk-wave-rect&quot;</span>&gt;&lt;/div&gt;</span><br><span class="line">          &lt;div className=<span class="string">&quot;sk-wave-rect&quot;</span>&gt;&lt;/div&gt;</span><br><span class="line">          &lt;div className=<span class="string">&quot;sk-wave-rect&quot;</span>&gt;&lt;/div&gt;</span><br><span class="line">        &lt;/div&gt;</span><br><span class="line">      &lt;/div&gt;</span><br><span class="line">    );</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>组件间传值及方法调用：</p>
<p>通过 props 进行传值</p>
<figure class="highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Template</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line">  <span class="function"><span class="title">constructor</span>(<span class="params">props</span>)</span> &#123;</span><br><span class="line">    <span class="comment">// 一定写这个</span></span><br><span class="line">    <span class="built_in">super</span>(props);</span><br><span class="line">    </span><br><span class="line">    <span class="comment">// state 可以写在外面</span></span><br><span class="line">    <span class="built_in">this</span>.state = &#123;</span><br><span class="line">      trBottomShadow: <span class="literal">false</span>,</span><br><span class="line">      borderColor: <span class="string">&quot;#133653&quot;</span>,</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line">    </span><br><span class="line">  state = &#123;</span><br><span class="line">    trBottomShadow: <span class="literal">false</span>,</span><br><span class="line">    borderColor: <span class="string">&quot;#133653&quot;</span>,</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="comment">// 子组件通信数据的默认值</span></span><br><span class="line">  <span class="keyword">static</span> defaultProps = &#123;</span><br><span class="line">    tableData: [],</span><br><span class="line">    headerList: [],</span><br><span class="line">    headerListFather: [],</span><br><span class="line">    height: <span class="string">&quot;90%&quot;</span>,</span><br><span class="line">    loading: <span class="literal">true</span>,</span><br><span class="line">    className: <span class="string">&quot;&quot;</span>,</span><br><span class="line">  &#125;;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line">&lt;Son tableData=&#123;tableData&#125;&gt;&lt;/Son&gt;</span><br></pre></td></tr></table></figure>



</li>
</ol>
<p>   子组件向父组件发送事件</p>
   <figure class="highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 子组件定义</span></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Button</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line">  <span class="function"><span class="title">constructor</span>(<span class="params">props</span>)</span> &#123;</span><br><span class="line">    <span class="built_in">super</span>(props);</span><br><span class="line">    <span class="built_in">this</span>.state = &#123;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="keyword">static</span> defaultProps = &#123;</span><br><span class="line">    clickEvent: <span class="function">(<span class="params">index</span>) =&gt;</span> &#123;&#125;,</span><br><span class="line">  &#125;;</span><br><span class="line"></span><br><span class="line">  <span class="function"><span class="title">render</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> (</span><br><span class="line">       &lt;button onclick=&#123;<span class="built_in">this</span>.props.clickEvent.bind(<span class="literal">null</span>)&#125;&gt;&lt;/button&gt;</span><br><span class="line">    )</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 父组件调用</span></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Father</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line">  <span class="function"><span class="title">constructor</span>(<span class="params">props</span>)</span> &#123;</span><br><span class="line">    <span class="built_in">super</span>(props);</span><br><span class="line">    <span class="built_in">this</span>.state = &#123;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line">	</span><br><span class="line">  clickEvent = <span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="comment">// 点击事件代码</span></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="function"><span class="title">render</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> (</span><br><span class="line">      &lt;Button</span><br><span class="line">        rowSelect=&#123;<span class="built_in">this</span>.clickEvent&#125;</span><br><span class="line">      &gt;&lt;/Button&gt;</span><br><span class="line">    )</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



<p>   父组件调用子组件的方法</p>
   <figure class="highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 子组件定义</span></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Son</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line">  <span class="function"><span class="title">constructor</span>(<span class="params">props</span>)</span> &#123;</span><br><span class="line">    <span class="built_in">super</span>(props);</span><br><span class="line">    <span class="built_in">this</span>.state = &#123;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line">  </span><br><span class="line">  drawChart = <span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="comment">// 画图方法</span></span><br><span class="line">  &#125;</span><br><span class="line">  </span><br><span class="line">  <span class="function"><span class="title">render</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> (</span><br><span class="line">       &lt;button onclick=&#123;<span class="built_in">this</span>.props.clickEvent.bind(<span class="literal">null</span>)&#125;&gt;&lt;/button&gt;</span><br><span class="line">    )</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 父组件调用</span></span><br><span class="line"><span class="class"><span class="keyword">class</span> <span class="title">Father</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line">  <span class="function"><span class="title">constructor</span>(<span class="params">props</span>)</span> &#123;</span><br><span class="line">    <span class="built_in">super</span>(props);</span><br><span class="line">    <span class="keyword">if</span> (props.onRef) &#123;</span><br><span class="line">      <span class="comment">//如果父组件传来该方法 则调用方法将子组件this指针传过去</span></span><br><span class="line">      props.onRef(<span class="built_in">this</span>);</span><br><span class="line">    &#125;</span><br><span class="line">    <span class="built_in">this</span>.state = &#123;</span><br><span class="line">    &#125;;</span><br><span class="line">  &#125;</span><br><span class="line">  </span><br><span class="line">  <span class="function"><span class="title">componentDidMount</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">    <span class="comment">// 在 this 中可以得到 sonRef 这个</span></span><br><span class="line">    <span class="built_in">this</span>.sonRef.drawChart();</span><br><span class="line">  &#125;</span><br><span class="line">	</span><br><span class="line">  clickEvent = <span class="function">() =&gt;</span> &#123;</span><br><span class="line">    <span class="comment">// 点击事件代码</span></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line">  <span class="function"><span class="title">render</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">    <span class="keyword">return</span> (</span><br><span class="line">      &lt;Son onRef=&#123;<span class="function">(<span class="params">ref</span>) =&gt;</span> (<span class="built_in">this</span>.sonRef = ref)&#125;&gt;</span><br><span class="line">      &lt;/Son&gt;</span><br><span class="line">    )</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<p><img src="/blog/C:/Users\luking\AppData\Local\Temp\1636700861225.png" alt="1636700861225"></p>
<p>​    </p>
<p>​    </p>
</blockquote>
<h4 id="11月22日"><a href="#11月22日" class="headerlink" title="11月22日"></a>11月22日</h4><blockquote>
<p>问题描述：关于复杂二级表头展示成后台返回的第一条数据问题</p>
<p>![lALPJv8gRRaQjDXM-80GnA_1692_251](D:\studyData\2020年\1202 - hexo博客\blog1202\source\img\lALPJv8gRRaQjDXM-80GnA_1692_251.png)</p>
<p>解决办法：</p>
<p>表头套表头+设置colspan+render-header </p>
</blockquote>
<h4 id="11月23日"><a href="#11月23日" class="headerlink" title="11月23日"></a>11月23日</h4><blockquote>
<p>问题描述：关于大项目交接给他人会碰到的问题⭐</p>
<p>问题详细：</p>
<pre><code>     1. 客户会问代码怎么运行，比如企业微信内部应用这种。
     2. 客户会问你环境怎么搭建，需要哪些环境和编辑器，比如 nodejs ，visual studio code。
     3. 客户会问生产发版注意事项。
     4. 客户会问发版时的服务器地址和目录。
     5. 客户会让你演示一遍权限怎么去配置。
     6. 最后，交接文档需要把客户首先要问的写的显眼一点。</code></pre>
</blockquote>
<h4 id="12月2日"><a href="#12月2日" class="headerlink" title="12月2日"></a>12月2日</h4><blockquote>
<p>问题起因：关于证书在移动端无效问题</p>
<p>问题描述：</p>
<pre><code>1. 此证书并非来自可信的授权中心</code></pre>
<p>解决办法：</p>
<p>​    1.访问网站查询该证书是否有效：<a target="_blank" rel="noopener" href="https://myssl.com/ssl.html">https://myssl.com/ssl.html</a></p>
</blockquote>
<blockquote>
<p>⭐小知识描述：关于多位数滚动组件封装</p>
<p>​    1.思路，准备1-10的标签；</p>
<p>​    2.竖起来排布，根据传回来的数字设置定位的 top 值；</p>
<p>​    3.添加 animation 动画；</p>
<p>代码：(React 组件)</p>
<figure class="highlight jsx"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br></pre></td><td class="code"><pre><span class="line">&gt;<span class="comment">/* eslint-disable */</span></span><br><span class="line">&gt;<span class="keyword">import</span> React, &#123; Component &#125; <span class="keyword">from</span> <span class="string">&quot;react&quot;</span>;</span><br><span class="line">&gt;<span class="keyword">import</span> * <span class="keyword">as</span> echarts <span class="keyword">from</span> <span class="string">&quot;echarts&quot;</span>;</span><br><span class="line">&gt;<span class="keyword">import</span> <span class="string">&quot;./index.less&quot;</span>;</span><br><span class="line"></span><br><span class="line">&gt;<span class="class"><span class="keyword">class</span> <span class="title">CutProgressChart</span> <span class="keyword">extends</span> <span class="title">Component</span> </span>&#123;</span><br><span class="line"> <span class="function"><span class="title">constructor</span>(<span class="params">props</span>)</span> &#123;</span><br><span class="line">   <span class="built_in">super</span>(props);</span><br><span class="line">   <span class="keyword">if</span> (props.onRef) &#123;</span><br><span class="line">     <span class="comment">//如果父组件传来该方法 则调用方法将子组件this指针传过去</span></span><br><span class="line">     props.onRef(<span class="built_in">this</span>);</span><br><span class="line">   &#125;</span><br><span class="line"> &#125;</span><br><span class="line"> <span class="keyword">static</span> defaultProps = &#123;</span><br><span class="line">   bindRefs: <span class="string">&quot;cutProgressChart&quot;</span>,</span><br><span class="line">   styles: &#123; <span class="attr">width</span>: <span class="string">&quot;100%&quot;</span>, <span class="attr">height</span>: <span class="string">&quot;10px&quot;</span> &#125;,</span><br><span class="line">   show: <span class="literal">true</span>,</span><br><span class="line">   progressData: <span class="number">0</span>,</span><br><span class="line"> &#125;;</span><br><span class="line"> state = &#123;</span><br><span class="line">   myChart: <span class="literal">null</span>,</span><br><span class="line">   oprion: &#123;&#125;,</span><br><span class="line"> &#125;;</span><br><span class="line"></span><br><span class="line"> componentDidMount = <span class="function">() =&gt;</span> &#123;</span><br><span class="line">   <span class="keyword">if</span> (<span class="built_in">this</span>.refs[<span class="built_in">this</span>.props.bindRefs]) &#123;</span><br><span class="line">     <span class="built_in">this</span>.state.myChart = echarts.init(<span class="built_in">this</span>.refs[<span class="built_in">this</span>.props.bindRefs]);</span><br><span class="line">   &#125;</span><br><span class="line"> &#125;;</span><br><span class="line"></span><br><span class="line"> drawChart = <span class="function">() =&gt;</span> &#123;</span><br><span class="line">   <span class="keyword">const</span> &#123; bindRefs, progressData &#125; = <span class="built_in">this</span>.props;</span><br><span class="line">   <span class="keyword">let</span> &#123; option, myChart &#125; = <span class="built_in">this</span>.state;</span><br><span class="line">   <span class="keyword">if</span> (<span class="built_in">this</span>.refs[bindRefs]) &#123;</span><br><span class="line">     option = &#123;</span><br><span class="line">       xAxis: &#123;</span><br><span class="line">         splitLine: &#123;</span><br><span class="line">           show: <span class="literal">false</span>,</span><br><span class="line">         &#125;,</span><br><span class="line">         axisLabel: &#123;</span><br><span class="line">           show: <span class="literal">false</span>,</span><br><span class="line">         &#125;,</span><br><span class="line">         axisTick: &#123;</span><br><span class="line">           show: <span class="literal">false</span>,</span><br><span class="line">         &#125;,</span><br><span class="line">         axisLine: &#123;</span><br><span class="line">           show: <span class="literal">false</span>,</span><br><span class="line">         &#125;,</span><br><span class="line">       &#125;,</span><br><span class="line">       grid: &#123;</span><br><span class="line">         top: <span class="number">0</span>,</span><br><span class="line">         left: -<span class="number">9</span>,</span><br><span class="line">         right: <span class="number">0</span>,</span><br><span class="line">         bottom: <span class="number">0</span>,</span><br><span class="line">         containLabel: <span class="literal">true</span>,</span><br><span class="line">       &#125;,</span><br><span class="line">       yAxis: [</span><br><span class="line">         &#123;</span><br><span class="line">           show: <span class="literal">false</span>,</span><br><span class="line">           axisLine: &#123;</span><br><span class="line">             show: <span class="literal">false</span>,</span><br><span class="line">           &#125;,</span><br><span class="line">           axisTick: &#123;</span><br><span class="line">             show: <span class="literal">false</span>,</span><br><span class="line">           &#125;,</span><br><span class="line">           data: [<span class="string">&quot;&quot;</span>],</span><br><span class="line">         &#125;,</span><br><span class="line">       ],</span><br><span class="line">       series: [</span><br><span class="line">         &#123;</span><br><span class="line">           <span class="comment">//内</span></span><br><span class="line">           type: <span class="string">&quot;bar&quot;</span>,</span><br><span class="line">           barWidth: <span class="number">18</span>,</span><br><span class="line">           legendHoverLink: <span class="literal">false</span>,</span><br><span class="line">           symbolRepeat: <span class="literal">true</span>,</span><br><span class="line">           silent: <span class="literal">true</span>,</span><br><span class="line">           itemStyle: &#123;</span><br><span class="line">             color: &#123;</span><br><span class="line">               type: <span class="string">&quot;linear&quot;</span>,</span><br><span class="line">               x: <span class="number">0</span>,</span><br><span class="line">               y: <span class="number">0</span>,</span><br><span class="line">               x2: <span class="number">1</span>,</span><br><span class="line">               y2: <span class="number">0</span>,</span><br><span class="line">               colorStops: [</span><br><span class="line">                 &#123;</span><br><span class="line">                   offset: <span class="number">0</span>,</span><br><span class="line">                   color: <span class="string">&quot;#B6D9F9&quot;</span>, <span class="comment">// 0% 处的颜色</span></span><br><span class="line">                 &#125;,</span><br><span class="line">                 &#123;</span><br><span class="line">                   offset: <span class="number">1</span>,</span><br><span class="line">                   color: <span class="string">&quot;#54BCF9&quot;</span>, <span class="comment">// 100% 处的颜色</span></span><br><span class="line">                 &#125;,</span><br><span class="line">               ],</span><br><span class="line">             &#125;,</span><br><span class="line">           &#125;,</span><br><span class="line">           data: [progressData],</span><br><span class="line">           z: <span class="number">1</span>,</span><br><span class="line">         &#125;,</span><br><span class="line">         &#123;</span><br><span class="line">           <span class="comment">//分隔</span></span><br><span class="line">           type: <span class="string">&quot;pictorialBar&quot;</span>,</span><br><span class="line">           itemStyle: &#123;</span><br><span class="line">             color: <span class="string">&quot;#1d2f4f&quot;</span>,</span><br><span class="line">           &#125;,</span><br><span class="line">           symbolRepeat: <span class="string">&quot;fixed&quot;</span>,</span><br><span class="line">           symbolMargin: <span class="number">2</span>,</span><br><span class="line">           symbol: <span class="string">&quot;roundRect&quot;</span>,</span><br><span class="line">           symbolClip: <span class="literal">true</span>,</span><br><span class="line">           symbolSize: [<span class="number">2</span>, <span class="number">18</span>],</span><br><span class="line">           symbolPosition: <span class="string">&quot;start&quot;</span>,</span><br><span class="line">           symbolOffset: [<span class="number">0</span>, <span class="number">0</span>],</span><br><span class="line">           data: [<span class="number">100</span>],</span><br><span class="line">           z: <span class="number">2</span>,</span><br><span class="line">           animationEasing: <span class="string">&quot;elasticOut&quot;</span>,</span><br><span class="line">         &#125;,</span><br><span class="line">       ],</span><br><span class="line">     &#125;;</span><br><span class="line"></span><br><span class="line">     myChart.setOption(option);</span><br><span class="line">   &#125;</span><br><span class="line">   <span class="comment">// echarts图随着窗口的大小变化而变化</span></span><br><span class="line">   <span class="built_in">window</span>.addEventListener(<span class="string">&quot;resize&quot;</span>, <span class="function">() =&gt;</span> &#123;</span><br><span class="line">     <span class="keyword">if</span> (myChart) myChart.resize();</span><br><span class="line">   &#125;);</span><br><span class="line"> &#125;;</span><br><span class="line"></span><br><span class="line"> state = &#123;&#125;;</span><br><span class="line"> <span class="function"><span class="title">render</span>(<span class="params"></span>)</span> &#123;</span><br><span class="line">   <span class="keyword">return</span> (</span><br><span class="line">     &lt;div className=<span class="string">&quot;cutProgressChart&quot;</span> style=&#123;<span class="built_in">this</span>.props.styles&#125;&gt;</span><br><span class="line">       &#123;<span class="built_in">this</span>.props.show ? (</span><br><span class="line">         &lt;div className=<span class="string">&quot;chart-wrap&quot;</span>&gt;</span><br><span class="line">           &lt;div</span><br><span class="line">             ref=&#123;<span class="built_in">this</span>.props.bindRefs&#125;</span><br><span class="line">             style=&#123;&#123; <span class="attr">width</span>: <span class="string">&quot;100%&quot;</span>, <span class="attr">height</span>: <span class="string">&quot;100%&quot;</span> &#125;&#125;</span><br><span class="line">           &gt;&lt;/div&gt;</span><br><span class="line">         &lt;/div&gt;</span><br><span class="line">       ) : (</span><br><span class="line">         &lt;div className=<span class="string">&quot;no-data&quot;</span>&gt;</span><br><span class="line">           &lt;a&gt;暂无数据&lt;/a&gt;</span><br><span class="line">         &lt;/div&gt;</span><br><span class="line">       )&#125;</span><br><span class="line">     &lt;/div&gt;</span><br><span class="line">   );</span><br><span class="line"> &#125;</span><br><span class="line">&gt;&#125;</span><br><span class="line"></span><br><span class="line">&gt;<span class="keyword">export</span> <span class="keyword">default</span> CutProgressChart;</span><br><span class="line"></span><br></pre></td></tr></table></figure>


</blockquote>
<h4 id="12月16日"><a href="#12月16日" class="headerlink" title="12月16日"></a>12月16日</h4><blockquote>
<p>问题描述：element 表格自定义提示框会和表格本身固定列冲突导致表格固定列错位</p>
</blockquote>
<h2 id="2020-1"><a href="#2020-1" class="headerlink" title="2020"></a>2020</h2><h4 id="03月25日"><a href="#03月25日" class="headerlink" title="03月25日"></a>03月25日</h4><blockquote>
<p>问题描述：<a target="_blank" rel="noopener" href="https://blog.csdn.net/luanxiyuan/article/details/103337616">使用 scss 换肤</a></p>
<p>解决办法：</p>
<ol>
<li><p>通过改变 body[data-theme=’variable’]，实现一键切换主题，variable就是主题的名称，比如  body[data-theme=’yuexiu-orange’]。 </p>
</li>
<li><p>新建一个theme.scss文件存放主题变量</p>
<figure class="highlight scss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 这里我们有三种主题</span></span><br><span class="line"><span class="variable">$themes</span>:(</span><br><span class="line">  yuexiu-orange:(</span><br><span class="line">    menuText:<span class="number">#fff</span>,</span><br><span class="line">    menuActiveText:<span class="number">#409EFF</span>,</span><br><span class="line">    subMenuActiveText:<span class="number">#f4f4f5</span>, // https://github.com/ElemeFE/element/issues/<span class="number">12951</span></span><br><span class="line">    menuBg:<span class="number">#FA8D19</span>,</span><br><span class="line">    menuHover:<span class="number">#FA8D19</span>,</span><br><span class="line">    subMenuBg:<span class="number">#fa7e19</span>,</span><br><span class="line">    subMenuHover:<span class="number">#fa7e19</span>,</span><br><span class="line">    tagViewBgActive:<span class="number">#fa7e19a8</span>,</span><br><span class="line">  ),</span><br><span class="line">  </span><br><span class="line">  business-black:(</span><br><span class="line">    menuText:<span class="number">#bfcbd9</span>,</span><br><span class="line">    menuActiveText:<span class="number">#409EFF</span>,</span><br><span class="line">    subMenuActiveText:<span class="number">#f4f4f5</span>, // https://github.com/ElemeFE/element/issues/<span class="number">12951</span></span><br><span class="line">    menuBg:<span class="number">#2B2E35</span>,</span><br><span class="line">    menuHover:<span class="number">#001528</span>,</span><br><span class="line">    subMenuBg:<span class="number">#151618</span>,</span><br><span class="line">    subMenuHover:<span class="number">#001528</span>,</span><br><span class="line">    tagViewBgActive:<span class="number">#4D565F</span>,</span><br><span class="line">  ),</span><br><span class="line">  </span><br><span class="line">  sat-blue:()</span><br><span class="line">)</span><br></pre></td></tr></table></figure>



</li>
</ol>
<ol start="3">
<li><p>新建一个处理变量的scss处理文件</p>
<figure class="highlight scss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// 引入变量</span></span><br><span class="line"><span class="keyword">@import</span> <span class="string">&#x27;./theme.scss&#x27;</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">@mixin</span> themeify &#123;</span><br><span class="line">  <span class="keyword">@each</span> <span class="variable">$theme-name</span>, <span class="variable">$theme-map</span> in <span class="variable">$themes</span> &#123;</span><br><span class="line">    <span class="variable">$theme-map</span>: <span class="variable">$theme-map</span> !global;</span><br><span class="line">    <span class="selector-tag">body</span><span class="selector-attr">[data-theme=#&#123;$theme-name&#125;]</span> &amp; &#123;</span><br><span class="line">      <span class="keyword">@content</span>;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"> </span><br><span class="line"><span class="keyword">@function</span> themed(<span class="variable">$key</span>) &#123;</span><br><span class="line">  <span class="keyword">@return</span> map-get(<span class="variable">$theme-map</span>, <span class="variable">$key</span>);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



</li>
</ol>
<ol start="4">
<li><p>使用：</p>
<ol>
<li><p>手动引入使用：</p>
<figure class="highlight scss"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">@import</span> <span class="string">&#x27;~@assets/theme/_themeify.scss&#x27;</span>;</span><br><span class="line"> </span><br><span class="line"><span class="selector-class">.app-home</span> &#123;</span><br><span class="line">  <span class="attribute">font-size</span>: <span class="number">18px</span>;</span><br><span class="line">  <span class="keyword">@include</span> themeify &#123;</span><br><span class="line">    <span class="attribute">color</span>: themed(<span class="string">&#x27;text-color-primary&#x27;</span>);</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>



</li>
</ol>
</li>
</ol>
<pre><code> 2. 建议：使用 [sass-resources-loader](https://www.npmjs.com/package/sass-resources-loader) 全局引入（使用该方法后你可以不再每个地方手动引入，更加快捷方便高效）

    <figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// vue.config.js中配置</span></span><br><span class="line"><span class="keyword">const</span> path = <span class="built_in">require</span>(<span class="string">&#x27;path&#x27;</span>);</span><br><span class="line"><span class="built_in">module</span>.exports = &#123;</span><br><span class="line">  chainWebpack: <span class="function">(<span class="params">config</span>) =&gt;</span> &#123;</span><br><span class="line">    <span class="keyword">const</span> oneOfsMap = config.module.rule(<span class="string">&#x27;scss&#x27;</span>).oneOfs.store;</span><br><span class="line">    oneOfsMap.forEach(<span class="function"><span class="params">item</span> =&gt;</span> &#123;</span><br><span class="line">      item</span><br><span class="line">        .use(<span class="string">&#x27;sass-resources-loader&#x27;</span>)</span><br><span class="line">        .loader(<span class="string">&#x27;sass-resources-loader&#x27;</span>)</span><br><span class="line">        .options(&#123;</span><br><span class="line">          <span class="comment">// 也可以选择全局变量路径数组, 如果你有多个文件需要成为全局,就可以采用这种方法</span></span><br><span class="line">          resources: [path.resolve(__dirname, <span class="string">&#x27;src/styles/theme/handler_theme.scss&#x27;</span>)]</span><br><span class="line">        &#125;)</span><br><span class="line">        .end()</span><br><span class="line">    &#125;)</span><br><span class="line">  &#125;,</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure></code></pre>
<ol start="5">
<li>最后就回到了第一步，给根节点 body 加上 data-theme 属性 body[data-theme=’yuexiu-orange’]，data-theme 这个名字可以自己取，要切换属性不用我多说了吧 document.setAttribute(‘data-theme’, 你的主题名字)</li>
</ol>
</blockquote>
<h4 id="04月13日"><a href="#04月13日" class="headerlink" title="04月13日"></a>04月13日</h4><blockquote>
<p>问题描述：vue dom渲染树状（嵌套）数组数据</p>
<p>解决办法：</p>
<ol>
<li>定义一个组件循环这个数组的最外层</li>
<li>在将这个组件在自己的内部使用一次循环第二层达到递归效果，注意自己的组件名字和name要一模一样</li>
</ol>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line">&gt;&lt;template&gt;</span><br><span class="line">&lt;div v-for&#x3D;&quot;(item,index) in list&quot; :key&#x3D;&quot;String(index)&quot;&gt;</span><br><span class="line">       &lt;!--自己内部调用一次--&gt;</span><br><span class="line">       &lt;nest&#x2F;&gt; </span><br><span class="line">   &lt;&#x2F;div&gt;</span><br><span class="line">&gt;&lt;&#x2F;template&gt;</span><br><span class="line">&gt;&lt;script&gt;</span><br><span class="line">   export default &#123;</span><br><span class="line">       name:&#39;nest&#39;</span><br><span class="line">       data()&#123;</span><br><span class="line">           return &#123;</span><br><span class="line">               list:[</span><br><span class="line">                   &#123;</span><br><span class="line">                       label:&quot;第一层&quot;,</span><br><span class="line">                       children:[</span><br><span class="line">                           &#123;</span><br><span class="line">                               label:&#39;第二层&#39;,</span><br><span class="line">                               children:[</span><br><span class="line">                                   &#123;</span><br><span class="line">                                       label:&#39;第三层&#39;</span><br><span class="line">                                   &#125;</span><br><span class="line">                               ]</span><br><span class="line">                           &#125;</span><br><span class="line">                       ]</span><br><span class="line">                   &#125;</span><br><span class="line">               ]    </span><br><span class="line">           &#125;</span><br><span class="line">       &#125;</span><br><span class="line">   &#125;</span><br><span class="line">&gt;&lt;&#x2F;script&gt;</span><br></pre></td></tr></table></figure>

</blockquote>
<h4 id="04月21日"><a href="#04月21日" class="headerlink" title="04月21日"></a>04月21日</h4><blockquote>
<p>问题描述：门户master-v2,0分支代码在ie浏览器空白问题</p>
<p>问题起因：</p>
<ol>
<li>swiper@8版本过高，换成了 swiper@3 和vue-awesome-swiper@3 代替其使用</li>
</ol>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">&gt;<span class="keyword">import</span> <span class="string">&#x27;swiper/dist/css/swiper.css&#x27;</span>;</span><br><span class="line">&gt;<span class="keyword">import</span> &#123; swiper, swiperSlide &#125; <span class="keyword">from</span> <span class="string">&#x27;vue-awesome-swiper&#x27;</span>;</span><br></pre></td></tr></table></figure>

<ol start="2">
<li><p>@antv-x6需要做配置操作来兼容IE浏览器,配置如下：</p>
</li>
<li><p>该选项默认值是 <code>[]</code>，说明会忽略掉所有掉 node<em>modules 文件，不会对 node</em>modules 里面对文件做 Babel。我们需要做的就是把我们希望 Babel 的文件加入即可，代码如下。需要注意的是我们加入的依赖<strong>不需要包含 node_modules ，用包名 @antv/g6</strong>即可，因为 @vue/cli 会自动添加前缀 node<em>modules 。还需要注意  @antv/g6 必须和 package.json 里面的一致。安装依赖的时候首选 npm ，如果你用 yarn、cnpm 等安装，需要确保 node</em>modules 里面的包名没有被更改。</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">module</span>.exports = &#123;</span><br><span class="line">  transpileDependencies: [<span class="string">&#x27;@antv/g6&#x27;</span>],</span><br><span class="line">&#125;;</span><br></pre></td></tr></table></figure>

<p>​    2.最开始的那个报错解决了，但出现了新问题。先用 Chrome 浏览器看看，发现问题是一样的。添加完 <code>transpileDependencies</code> 兼容性问题是没有了，但出了个新错误。再次查看官网，并没有相关文章，那就直接移步 issue 吧。经过一番查找，我们找到如下解决方案，在 babel.config.js 里面添加上 <code>sourceType: &quot;unambiguous&quot;</code> ，具体含义可以官网查阅。</p>
</li>
</ol>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&gt;<span class="built_in">module</span>.exports = &#123;</span><br><span class="line"> sourceType: <span class="string">&#x27;unambiguous&#x27;</span>,</span><br><span class="line"> presets: [<span class="string">&#x27;@vue/cli-plugin-babel/preset&#x27;</span>],</span><br><span class="line">&gt;&#125;;</span><br></pre></td></tr></table></figure>
</blockquote>
<h4 id="06月16日"><a href="#06月16日" class="headerlink" title="06月16日"></a>06月16日</h4><blockquote>
<p>问题描述：node-sass在 node-v16版本 报错兼容性差（将node-sass换成dart-sass）</p>
<p>问题起因：因为sass官方在nide-v14版本以后使用dart-sass代替了node-sass,node-sass要依靠电脑底层C++语言进行编译，兼容性较差，sass官方便使用了dart-sass以虚拟的sass形式最后编译成css文件，这样不仅兼容性好且性能高</p>
<p>解决办法：</p>
<ol>
<li><p>将nodejs版本换到16以上</p>
</li>
<li><p>卸载node-sass sass-loader sass  (npm uninstall node-sass sass-loader sass)</p>
</li>
<li><p>再安装新的 sass-loader sass (npm install sass-loader sass -D)</p>
</li>
<li><p>更新vue.config.js文件</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// vue.config.js</span></span><br><span class="line"><span class="built_in">module</span>.exports = &#123;</span><br><span class="line">  css: &#123;</span><br><span class="line">    loaderOptions: &#123;</span><br><span class="line">      sass: &#123;</span><br><span class="line">        implementation: <span class="built_in">require</span>(<span class="string">&#x27;sass&#x27;</span>), <span class="comment">// This line must in sass option</span></span><br><span class="line">      &#125;,</span><br><span class="line">    &#125;,</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>重启项目，如果node-gyp报错就全局安装更新 (npm install  node-gyp -g)</p>
</li>
<li><p>如果报Rule can only have one resource source (provided resource and test + include + exclude) in，就安装 (npm install webpack@^4.0.0 –save-dev)</p>
</li>
<li><p>如果 vue.config中的 sass prependData报错</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">   </span><br></pre></td></tr></table></figure>

<p>就修改</p>
<p>原来的</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">css: &#123;</span><br><span class="line">    loaderOptions: &#123;</span><br><span class="line">      sass: &#123;</span><br><span class="line">        prependData: <span class="string">&#x27;@import &quot;@/scss/settings.scss&quot;;&#x27;</span></span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure>

<p>修改后的</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">css: &#123;</span><br><span class="line">    loaderOptions: &#123;</span><br><span class="line">      sass: &#123;</span><br><span class="line">        additionalData: <span class="string">&#x27;@import &quot;@/scss/settings.scss&quot;;&#x27;</span></span><br><span class="line">      &#125;</span><br><span class="line">    &#125;</span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure>
</li>
<li><p>如果 sass /deep/ 报错 就把 /deep/ 换成 ::v-deep</p>
</li>
<li><p>不出意外就可以正常运行了</p>
</li>
</ol>
</blockquote>

      
    </div>
    <div class="article-footer">
      <blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">
    
    <li class="post-copyright-link hidden-xs">
      <strong>本文链接：</strong>
      <a href="https://xulujin.gitee.io/blog/2020/07/17/%E5%B7%A5%E4%BD%9C%E4%B8%AD%E7%A2%B0%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/" title="在工作中遇到的问题" target="_blank" rel="external">https://xulujin.gitee.io/blog/2020/07/17/%E5%B7%A5%E4%BD%9C%E4%B8%AD%E7%A2%B0%E5%88%B0%E7%9A%84%E4%B8%80%E4%BA%9B%E9%97%AE%E9%A2%98/</a>
    </li>
    
    <li class="post-copyright-license">
      <strong>版权声明： </strong> 本博客所有文章除特别声明外，均采用 <a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external">CC BY 4.0 CN协议</a> 许可协议。转载请注明出处！
    </li>
  </ul>
</blockquote>


<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://github.com/1314xulujin" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="/blog/images/avatar.jpg" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://github.com/1314xulujin" target="_blank"><span class="text-dark">LuKing-Xun</span><small class="ml-1x">前端工程师</small></a></h3>
        <div>邮箱:luking-xun@qq.com 微信:Element-UI</div>
      </div>
    </figure>
  </div>
</div>


    </div>
  </article>
  
    
  <section id="comments">
  	

    
  </section>


  
</div>

  <nav class="bar bar-footer clearfix" data-stick-bottom>
  <div class="bar-inner">
  
  <ul class="pager pull-left">
    
    <li class="prev">
      <a href="/blog/2020/07/17/vscode%E6%8F%92%E4%BB%B6%E5%A4%A7%E5%85%A8/" title="vscode常用插件在"><i class="icon icon-angle-left" aria-hidden="true"></i><span>&nbsp;&nbsp;Newer</span></a>
    </li>
    
    
    <li class="next">
      <a href="/blog/2020/07/17/%E6%B7%B1%E5%BA%A6%E4%BC%98%E5%85%88%E9%81%8D%E5%8E%86%E5%92%8C%E5%B9%BF%E5%BA%A6%E4%BC%98%E5%85%88%E9%81%8D%E5%8E%86/" title="深度优先遍历和广度优先遍历"><span>Older&nbsp;&nbsp;</span><i class="icon icon-angle-right" aria-hidden="true"></i></a>
    </li>
    
    
  </ul>
  
  
  <!-- Button trigger modal -->
  <button type="button" class="btn btn-fancy btn-donate pop-onhover bg-gradient-warning" data-toggle="modal" data-target="#donateModal"><span>$</span></button>
  <!-- <div class="wave-icon wave-icon-danger btn-donate" data-toggle="modal" data-target="#donateModal">
    <div class="wave-circle"><span class="icon"><i class="icon icon-bill"></i></span></div>
  </div> -->
  
  
  <div class="bar-right">
    
    <div class="share-component" data-sites="weibo,qq,wechat,facebook,twitter" data-mobile-sites="weibo,qq,qzone"></div>
    
  </div>
  </div>
</nav>
  
<!-- Modal -->
<div class="modal modal-center modal-small modal-xs-full fade" id="donateModal" tabindex="-1" role="dialog">
  <div class="modal-dialog" role="document">
    <div class="modal-content donate">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
      <div class="modal-body">
        <div class="donate-box">
          <div class="donate-head">
            <p>Maybe you could buy me a cup of coffee.</p>
          </div>
          <div class="tab-content">
            <div role="tabpanel" class="tab-pane fade active in" id="alipay">
              <div class="donate-payimg">
                <img src="/blog/images/donate/alipay.jpg" alt="Scan Qrcode" title="Scan" />
              </div>
              <p class="text-muted mv">Scan this qrcode</p>
              <p class="text-grey">Open alipay app scan this qrcode, buy me a coffee!</p>
            </div>
            <div role="tabpanel" class="tab-pane fade" id="wechatpay">
              <div class="donate-payimg">
                <img src="/blog/images/donate/wechatpay.jpg" alt="Scan Qrcode" title="Scan" />
              </div>
              <p class="text-muted mv">Scan this qrcode</p>
              <p class="text-grey">Open wechat app scan this qrcode, buy me a coffee!</p>
            </div>
          </div>
          <div class="donate-footer">
            <ul class="nav nav-tabs nav-justified" role="tablist">
              <li role="presentation" class="active">
                <a href="#alipay" id="alipay-tab" role="tab" data-toggle="tab" aria-controls="alipay" aria-expanded="true"><i class="icon icon-alipay"></i> alipay</a>
              </li>
              <li role="presentation" class="">
                <a href="#wechatpay" role="tab" id="wechatpay-tab" data-toggle="tab" aria-controls="wechatpay" aria-expanded="false"><i class="icon icon-wepay"></i> wechat payment</a>
              </li>
            </ul>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>



</main>

  <footer class="footer" itemscope itemtype="http://schema.org/WPFooter">
	
	
    <ul class="social-links">
    	
        <li><a href="https://github.com/1314xulujin" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="icon icon-github"></i></a></li>
        
        <li><a href="https://mail.qq.com/cgi-bin/loginpage" target="_blank" title="Email" data-toggle=tooltip data-placement=top><i class="icon icon-email"></i></a></li>
        
        <li><a href="/blog/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="icon icon-rss"></i></a></li>
        
    </ul>

    <div class="copyright">
    	
        <div class="publishby">
        	<!-- Theme by <a href="https://github.com/cofess" target="_blank"> cofess </a>base on <a href="https://github.com/cofess/hexo-theme-pure" target="_blank">pure</a>. -->
            更多功能正在开发中...
        </div>
    </div>
</footer>
  <script src="//cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>

<script src="/blog/js/plugin.min.js"></script>


<script src="/blog/js/application.js"></script>


    <script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: 'Posts',
            PAGES: 'Pages',
            CATEGORIES: 'Categories',
            TAGS: 'Tags',
            UNTITLED: '(Untitled)',
        },
        ROOT_URL: '/blog/',
        CONTENT_URL: '/blog/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>

<script src="/blog/js/insight.js"></script>






   




   
    
<script src="//cdn.jsdelivr.net/npm/gitment@0.0.3/dist/gitment.browser.min.js"></script>
<script>
var gitment = new Gitment({
  // id默认为当前页面url，如果url后带参数或锚点，gitment要重新初始化
  // https://github.com/imsun/gitment/issues/55
  // 解决方案：id:window.location.pathname,或者将id设置为当前页面标题
  id: '在工作中遇到的问题', 
  owner: '1314xulujin', // 可以是你的GitHub用户名，也可以是github id
  repo: '1314xulujin.github.io',
  oauth: {
    client_id: 'f5572d863183b5e79cf9',
    client_secret: '8754b0d4afae1b366e75b4058a4b83a66ed82f05',
  }
})
gitment.render('comments')
</script>









</body>
</html>